﻿namespace System;
/// <summary>
/// 
/// </summary>
/// <typeparam name="T"></typeparam>
public interface ISpecification<T>
{
    /// <summary>
    /// 
    /// </summary>
    /// <param name="obj"></param>
    /// <returns></returns>
    bool IsSatisfiedBy(T obj);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="other"></param>
    /// <returns></returns>
    ISpecification<T> And(ISpecification<T> other);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="other"></param>
    /// <returns></returns>
    ISpecification<T> Or(ISpecification<T> other);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="other"></param>
    /// <returns></returns>
    ISpecification<T> AndNot(ISpecification<T> other);
    /// <summary>
    /// 
    /// </summary>
    /// <returns></returns>
    ISpecification<T> Not();
    /// <summary>
    /// 
    /// </summary>
    /// <returns></returns>
    Expression<Func<T, bool>> GetExpression();
}
